package cn.echoedu.control;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.echoedu.command.base.SuccessParam;
import cn.echoedu.entity.Department;
import cn.echoedu.entity.receivecommand.DepartmentListReceive;

public class DepartmentControl extends BaseControl{

	public void doQueryDepartmentList(HttpServletRequest request,
			HttpServletResponse response,
			DepartmentListReceive departmentreceive) {
		// TODO Auto-generated method stub
		List<Department> list = getDepartmentModel().queryDepartmentList(departmentreceive);
		sendSuccess(getSuccessParam(request,response,list,departmentreceive.getToken(),
				departmentreceive.getCode()));


	}

	private void sendSuccess(SuccessParam successParam) {
		// TODO Auto-generated method stub
		getResponseService().doDepartmentList(successParam);
	}



}
